<template>
<div>

  <p>
    路由的fullPath---
    {{$route.fullPath}}
  </p>
  <p>
    收到的参数
    {{$route.params}}
    {{$route.query}}
  </p>
  <a-button type="primary"  @click="toBluePage()">跳到blue页（通过路由name跳转）</a-button>

</div>
</template>

<script>
export default {
  name: "Red",
  mounted() {
    console.log( this.$route)

  },
  methods:{
    toBluePage(){
      //跳转后的地址栏 http://localhost:8080/blue/1234?key=qwerty
      this.$router.push({
        name:'Blue', //路由的name
        params:{
          id:'1234'
        },
        query:{
          key:'qwerty'
        }
      });

    }
  }
}
</script>

<style scoped>

</style>
